package cn.com.xuhx.mapper;

import cn.com.xuhx.pojo.Department;
import cn.com.xuhx.pojo.Equipment;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ReturnTypeMapper {

    //返回map
    Map<String, Object> queryUserByIDForMap(int id);

    //多个参数
    List<Map<String,Object>> queryUserByAgeAndTelMap(@Param("age") int age, @Param("tel") String tel);

    //多对一（级联属性）
    List<Equipment> queryEquipment();

    //多对一（association）
    List<Equipment> queryEquipment2();

    //多对一（association分步查询）
    List<Equipment> queryEquipment3();
    Department queryDepartMentByID(@Param("id") int id);

    //一对多（collection）
    List<Department> queryDepartment();

    //一对多（collection分步查询）
    List<Department> queryDepartment2();
    List<Equipment> queryEquipmentByDeparmentID(@Param("departmentID") int departmentID);
}
